package org.example.test

import java.io.OutputStream
import java.net.Socket

/**
 * 客户端
 */
object Driver {
  def main(args: Array[String]): Unit = {
    val socket:Socket = new Socket("localhost",9999)

    val stream: OutputStream = socket.getOutputStream
    stream.write(2)
    stream.flush()

    stream.close()

    socket.close()
  }
}
